<include file="Admin@Public/header" /> 

<div class="col-sm-9 col-sm-offset-3 col-md-10 col-md-offset-2 main">
    <ol class="breadcrumb">
      <li>网站内容</li>
      <li>栏目管理</li>
      <li class="active">添加</li>
    </ol>
     
    <form  class="form-horizontal" role="form" action="__URL__/save" >
      <input type="hidden" name="inputId" value="0" > 

      <div class="form-group">
        <label for="inputParent" class="col-sm-2 control-label">父级 </label>
        <div class="col-sm-4">
          <?php $allTypes = R('Content/Type/tree'); ?>
          <select name="inputParent" class="form-control" id="inputParent">
            <option value="0">作为父级</option>
            <volist name="allTypes" id="type">
              <option value="{$type.id}" <if condition="$parentId == $type['id']">selected="selected"</if> >{$type.html}{$type.name}</option>
            </volist>  
          </select>
        </div>
      </div>
      <div class="form-group">
        <label for="inputName" class="col-sm-2 control-label">栏目 </label>
        <div class="col-sm-4">
          <input type="text" class="form-control" id="inputName" name="inputName" placeholder="请输入栏目分类名" datatype="*2-10" errormsg="<i class='icon-warning-sign'></i> 栏目分类名在2~10位之间"  nullmsg="<i class='icon-warning-sign'></i> 请填写信息！" >
        </div>
        <div class="Validform_checktip">
           <div class="Validform-info">栏目分类名至少2个字符,最多10个字符<span class="dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
        </div>
      </div>
      <div class="form-group">
        <label for="inputUrl" class="col-sm-2 control-label">URL </label>
        <div class="col-sm-4">
          <input type="text" class="form-control" id="inputUrl" name="inputUrl" placeholder="请输入栏目自定义链接" datatype="p_url" errormsg="<i class='icon-warning-sign'></i> 链接含有非法字符或已存在" sucmsg="<i class='icon-ok'></i>"  ignore="ignore" ajaxurl="/Plugin/verify/validNoUrl" >
        </div>
        <div class="Validform_checktip">
           <div class="Validform-info">自定义链接如：新闻 news <span class="dec"><s class="dec1">&#9670;</s><s class="dec2">&#9670;</s></span></div>
        </div>
      </div>
      <?php $tpl_list = getTplFiles('List'); ?>
      <div class="form-group">
        <label for="inputTemplatelist" class="col-sm-2 control-label">列表模版</label>
        <div class="col-sm-4">
          <select name="inputTemplatelist" id="inputTemplatelist" class="form-control">
            <volist name="tpl_list" id="tpl">
              <option value="{$tpl.name}">{$tpl.fullname}</option>
            </volist>  
          </select>
        </div>
      </div>
      <?php $tpl_Article = getTplFiles('Article'); ?>
      <div class="form-group">
        <label for="inputTemplate" id="inputTemplate" class="col-sm-2 control-label">单页模版</label>
        <div class="col-sm-4">
          <select name="inputTemplate" class="form-control">
            <volist name="tpl_Article" id="tpl">
              <option value="{$tpl.name}">{$tpl.fullname}</option>
            </volist>  
          </select>
        </div>
      </div>
      <div class="form-group">
        <label  class="col-sm-2 control-label"> </label>
        <div class="col-sm-4">
          <input type="button" class="btn btn-primary" value="添加" id="btn_sub"/>
           <a href="__URL__/index" class="btn btn-default" >返回</a>
      </div>
    </div>
    </form> 
</div>


<include file="Admin@Public/script_form" /> 
<include file="Admin@Public/footer" /> 